#!/usr/bin/env python

import sqlalchemy as sa

from model import DeclarativeBase

__all__ = ['Search']


class Search(DeclarativeBase):
    """
    Intended tag to be search from host.

    This value may contains - (minus) as specified by booru host to exclude
    tag.

    Attributes:
        - id: An integer represent the primary key.
        - value: A string of tag to be searched.
    """

    __tablename__ = 'searches'

    id = sa.Column(sa.Integer, primary_key=True)
    """
    The primary key

    @type: int
    """

    value = sa.Column(sa.String(255), nullable=False, unique=True, index=True)
    """
    The search value.

    @type: str
    """
